<template>
  <!-- 未登录 -->
  <div class="mine">
    <div class="header">
      <div class="img">
        <van-image
          round
          width="4rem"
          height="4rem"
          fit="cover"
          src="https://img2.baidu.com/it/u=148072212,2491081866&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1667926800&t=b111e93dc77a9804ed46b4d41149a8a3"
        />
        <span @click="this.$router.push('/login')">登录</span>
      </div>
      <div>
        <van-icon name="chat-o" size="2rem" color="#fff" />
      </div>
    </div>
    <div class="main">
      <div class="box">
        <ul>
          <li v-for="(item, index) in box" :key="index">
            <strong>{{ item.num }}</strong>
            <p>{{ item.name }}</p>
          </li>
        </ul>
      </div>
      <ul class="list">
        <li v-for="(item, index) in list" :key="index">
          <div>
            <van-icon :name="item.icon" size="1.4rem" :color="item.color" />
            <span>{{ item.name }}</span>
          </div>
          <van-icon name="arrow" size="1rem" />
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  name: 'mine-unlogin',
  data() {
    return {
      box: [
        { num: 0, name: '我的订单' },
        { num: 0, name: '我的关注' },
        { num: 0, name: '我的余额' },
      ],
      list: [
        { icon: 'coupon-o', color: '#666EE8', name: '我的优惠券' },
        { icon: 'gold-coin-o', color: '#FFC71C', name: '我的推广' },
        { icon: 'comment-o', color: '#28D094', name: '帮助与反馈' },
        { icon: 'setting-o', color: '#1E9FF2', name: '设置' },
      ],
    }
  },
}
</script>

<style lang="less" scoped>
html,
body {
  width: 100%;
  height: 100%;
  .mine {
    height: 100%;

    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgb(102, 110, 232);
      height: 10rem;
      padding: 0 2%;

      .img {
        display: flex;
        justify-content: center;
        align-items: center;
        span {
          color: #fff;
          padding-left: 1rem;
        }
      }
    }
    .main {
      .box {
        width: 18rem;
        height: 6rem;
        border-radius: 0.5rem;
        top: 27%;
        left: 50%;
        transform: translate(-50%, -50%);
        position: absolute;
        background: #fff;
        border: 0.05rem solid #eee;
        ul {
          display: flex;
          width: 18rem;
          height: 6rem;
          justify-content: space-around;
          align-items: center;
          li {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 1rem;

            strong {
              font-size: 1.4rem;
            }
          }
        }
      }
      .list {
        margin-top: 5rem;
        li {
          height: 9vh;
          display: flex;
          justify-content: space-between;
          align-items: center;
          border-bottom: 0.01rem solid #eee;
          padding: 0 2%;
          div {
            display: flex;
            align-items: center;
          }
          span {
            padding-left: 0.3rem;
            font-weight: bold;
          }
        }
      }
    }
  }
}
</style>
